import { LOAD_DATA,UP_DATA,SET_DATA} from "../constants";
import defaultState from '../state';
export default (state=defaultState,action)=>{
    switch(action.type){
        case LOAD_DATA:
            return {
                ...state,
                demoNum:action.payload
            }
        case UP_DATA:
            return {
                ...state,
                demoNum:action.payload
            }
        
        case SET_DATA:
            console.log(action);
            return {
                ...state,
                demoNum:action.payload
            }
        default:
            return {
                ...state
            }
    }
}